﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using KelonProud.QuickQuery.Domain;
using System;
using System.Collections.Generic;
using System.Text;

namespace KelonProud.QuickQuery.Dtos
{
    [AutoMap(typeof(QueryGrid))]
    public class QueryGridInput:EntityDto
    {
        public virtual string Name { get; set; }

        public virtual string Code { get; set; }

        public virtual string SelectSql { get; set; }

        public virtual string ExportSql { get; set; }

        public virtual string Description { get; set; }

        public virtual bool IsAutoLoad { get; set; }

        public virtual int? NavigationId { get; set; }

        public virtual string NavigationName { get; set; }
        public virtual string NavigationCode { get; set; }

        public long? CreatorUserId { get; set; }

        public virtual string CreateUserName { get; set; }

        public virtual List<QueryCommandDto> Commands { get; set; }

        public virtual ICollection<QueryGridColumn> Columns { get; set; }

        public int? TenantId { get; set; }

        public DateTime? LastModificationTime { get; set; }

        public long? LastModifierUserId { get; set; }

        public DateTime CreationTime { get; set; }

        public bool IsBindNav => this.NavigationId.HasValue;
    }

    [AutoMap(typeof(QueryGrid))]
    public class QueryGridOutput : QueryGridInput
    {
    }
}
